<?php
namespace App\Admin\Models;
use Common\BaseModel;
class CollegeColumn extends BaseModel
{
    protected $res;
    protected $key="admin_";
    public function initialize()
    {
        parent::initialize();
        $this->setSource('f_college_column');
    }

    public function find_list(){
        $conditions="is_show=1";
        $order="sort ASC,id ASC";
        $user_list = $this::find(
            array(
                $conditions,
                "order" => $order,
            )
        );
        return $user_list;
    }

    public function find_by_id($id){
        $info = $this->findFirstById($id);
        if($info){
            return $info->toarray();
        }else{
            return [];
        }
    }

    public function save_cloumn($params){
        return $this::save($params);
    }

}
